package dsl.groovy.conf

/**
 * @author lesofn
 * @version 1.0 2021-03-02 11:59
 */
class HttpConf {
    private int tryTime = 1
    private String url
    private String method = "POST"
    private String params = ""
    private String data
    private String times

    HttpConf data(String data) {
        this.data = data
        return this
    }

    HttpConf times(String times) {
        this.times = times
        return this
    }

    HttpConf params(String params) {
        this.params = params
        return this
    }

    HttpConf url(String url) {
        this.url = url
        return this
    }

    HttpConf method(String method) {
        this.method = method
        return this
    }

    HttpConf tryTime(int tryTime) {
        this.tryTime = tryTime
        return this
    }

    int getTryTime() {
        return tryTime
    }

    String getParams() {
        return params
    }

    String getUrl() {
        return url
    }

    String getMethod() {
        return method
    }

    String getData() {
        return data
    }

    String getTimes() {
        return times
    }
}
